package ichubcache

import (
	"gitee.com/ichub/goconfig/common/base/baseiface"
	"gitee.com/ichub/goconfig/common/basedi"
    "github.com/sirupsen/logrus"
  	"gitee.com/ichub/goconfig/common/base/baseutils/goutils"

	
)

/*
 * ********************************************************
 * godi工具生成代码，不建议直接修改!
 * ********************************************************
 */

/* ********************************************************
	@Title  文件名称: ichub_cache_init.go
	@Desp   描述:    自动注册注入

	@Author 作者: leijmdas@163.com 时间(2024-08-11 16:25:42)
	@Update 作者: leijmdas@163.com 时间(2024-08-11 16:25:42)

* *********************************************************/

const singleNameIchubCache = "*ichubcache.IchubCache-7a5a5838e1ec40fc95a344db790a8ef4"

// init register load
func init() {
	registerBeanIchubCache()
}

// register IchubCache
func registerBeanIchubCache() {
	basedi.RegisterLoadBean(singleNameIchubCache, LoadIchubCache)
}

func FindBeanIchubCache() *IchubCache {
	bean, ok :=  basedi.FindBean(singleNameIchubCache).(*IchubCache)
    if !ok {
        logrus.Errorf("FindBeanIchubCache: failed to cast bean to *IchubCache")
        return nil
    }
    return bean

}

func LoadIchubCache() baseiface.ISingleton {
	var s = NewCache()
	InjectIchubCache(s)
	return s

}

func InjectIchubCache(s *IchubCache)    {
    
    goutils.Debug("inject")
}


